Skip to content

chore(gen2-migration): e2e enhancements#14768

Merged
iliapolo merged 4 commits intogen2-migrationfrom
epolon/e2e-capture-snapshot
Apr 10, 2026
Merged

chore(gen2-migration): e2e enhancements#14768
iliapolo merged 4 commits intogen2-migrationfrom
epolon/e2e-capture-snapshot

Conversation

@iliapolo
Copy link
Copy Markdown
Contributor

@iliapolo iliapolo commented Apr 10, 2026

Description of changes

This PR consolidates snapshot capture and sanitization logic into the E2E system
package, and adds a development skill for the gen2-migration feature.

The main motivation: snapshot capture and sanitization were manual steps that had to be
run separately after E2E tests. Now both are integrated into the E2E system and run
automatically when UPDATE_SNAPSHOTS=1 is set.

Automated snapshot capture and sanitization

Snapshot capture functions and sanitization logic are now shared modules in the E2E system
package. The E2E workflow captures snapshots at each step (pre/post generate, pre/post
refactor) and sanitizes and updates them automatically when UPDATE_SNAPSHOTS=1 is set. The
migration-apps scripts now delegate to these shared modules.

Improved sanitization

Sanitization now also covers Gen2 API keys from _snapshot.pre.refactor/ outputs and OS
usernames from sandbox stack names.

E2E system improvements

The App class owns the full migration workflow via deploy() and migrate() methods,
with snapshot capture integrated at each step. Git wrapper methods replaced with direct
this.git.* calls. The CLI gains a --step option (deploy or migrate) for running
partial workflows, and a deploy npm script was added to all apps.

Refactor output directory rename

Changed from .amplify/refactor.operations to .gen2-migration/refactor.operations to
avoid conflicts with the Amplify directory. Updated gitignore entries in both the generator
and migration apps accordingly.

Documentation

Migration apps README simplified with updated snapshot capture tool usage, E2E snapshot step
added to "Adding an App" and "Modifying an App" sections.

Gen2-migration development skill

New .kiro/skills/gen2-migration/SKILL.md with context references (docs, code, apps) and
step-by-step workflows for bug fixes and new features.

Issue #, if available

N/A

Description of how you validated changes

  • Pre-commit hooks pass (sanitization, prettier, lint, commitlint)
  • Snapshot tests not affected (no production logic changes to generate/refactor)

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)
  • New AWS SDK calls or CloudFormation actions have been added to relevant test and service IAM policies
  • Pull request labels are added

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

iliapolo added 4 commits April 9, 2026 21:55
…and add gen2-migration skill

Move sanitize and snapshot capture logic into the e2e-system
package so that sanitization runs automatically as part of the
E2E flow. Simplify the migration-apps sanitize.ts and snapshot.ts
to delegate to the shared implementation.

Add a gen2-migration development skill with context references
and a development loop for bug fixes and new features.

Minor fixes to gitignore generator and refactor output directory.
---
Prompt: we are working on the gen2-migration skill and e2e
snapshot capture improvements
Streamline the gen2-migration skill with structured Context and
Development Loop sections covering bug fix and feature workflows.

Add missing E2E snapshot capture step to "Adding an App" and
"Modifying an App" sections in the migration apps README.
---
Prompt: refine the gen2-migration skill and fix missing E2E step
in migration apps README
Remove git wrapper methods and call this.git.* directly. Move
migrate() next to the other migration methods. Reorganize class
sections (Tests, Hooks). Filter updateSnapshots to only copy
_snapshot directories.
---
Prompt: commit
Add deploy npm script to all migration apps. Fix snapshot.ts
usage string and README to match new argument signature. Add
JSDoc to new public members. Update PR template headings to h3.
Update AGENTS.md PR body instructions with grouping guidance.
---
Prompt: add deploy script to all apps, check for outdated
docstrings, update PR template and AGENTS.md
@iliapolo iliapolo requested a review from a team as a code owner April 10, 2026 04:14
@iliapolo iliapolo enabled auto-merge (squash) April 10, 2026 12:30
Copy link
Copy Markdown
Contributor

@dgandhi62 dgandhi62 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Questions mainly

@iliapolo iliapolo merged commit 3daee12 into gen2-migration Apr 10, 2026
4 checks passed
@iliapolo iliapolo deleted the epolon/e2e-capture-snapshot branch April 10, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants